

var page = require('webpage').create();
page.open('http://localhost:8080/staff_page/s_cost.jsp?costId=1342087798903029762', function(success){

    if(success==='success'){
        console.log('success');
        page.render('CostPNG.png');
        phantom.exit();

    }else{

        console.log('error');

        phantom.exit();

    }

});




